home *** CD-ROM | disk | FTP | other *** search
- /* msstat.c - get MS-DOS file status.
- (C) Copyright 1984 Gregory R. Mansfield - All Rights Reserved.
- G. R. Mansfield. 84/07/25.
- Ver 1.0-4801.
- */
-
- #include <defstd.h>
- #include <msstat.h>
-
- int msstat(name, buf)
- char *name; /* string containing path name */
- struct msstat *buf; /* buffer to receive information */
- {
- BYTE *p, mbuf[45];
- int i;
-
- if (msfmf(name, SA_AM, mbuf) == ERR) /* find matching file */
- return(ERR);
- for (p = buf, i = 21; i < 44; i++) /* copy to stat buf */
- *p++ = mbuf[i];
- if (msfnf() != ERR) /* error if file name is not unique */
- return(ERR);
- return(0);
- }
-